package com.rpoonolly.simplegame;

import java.awt.Color;
import java.util.concurrent.atomic.AtomicBoolean;

import org.apache.commons.lang3.ArrayUtils;

import com.rpoonolly.simplegame.textures.TextureFileDescriptor;
import com.rpoonolly.simplegame.textures.TextureId;

public class Config {
	public static final String GAME_TITLE = "Simple 2d Game";
	public static final int WINDOW_REDRAW_DELAY = 20;
	public static final int WINDOW_DEFAULT_WIDTH = 500;
	public static final int WINDOW_DEFAULT_HEIGHT = 500;
	
	public static final String DEFAULT_MAP_NAME = "Map1";
	
	public static final TextureFileDescriptor[] WORLD_GRID_TEXTURE_FILES = {
		new TextureFileDescriptor("textures/grass.png", 3, 6),
		new TextureFileDescriptor("textures/castlefloors_outside.png", 4, 5),
	};
	
	public static final TextureFileDescriptor[] ENT_TEXTURE_FILES = {
		new TextureFileDescriptor("textures/male_walkcycle.png", 9, 4),
		new TextureFileDescriptor("textures/bee.png", 3, 4),
		new TextureFileDescriptor("textures/ghost.png", 3, 4),
	};
	
	public static final TextureFileDescriptor[] TEXTURE_FILE_LIST = ArrayUtils.<TextureFileDescriptor>addAll(WORLD_GRID_TEXTURE_FILES, ENT_TEXTURE_FILES);
	
	public static final TextureId WORLD_GRID_TEXTURE_DEFAULT = new TextureId(WORLD_GRID_TEXTURE_FILES[0], 1, 5);
	
	public static final int PLAYER_WIDTH = 64;
	public static final int PLAYER_HEIGHT = 64;
	public static final double PLAYER_SPEED = 100;
	public static final TextureFileDescriptor PLAYER_TEXTURE_MAP = ENT_TEXTURE_FILES[0]; 
	
	public static final int ENEMY_WIDTH = 32;
	public static final int ENEMY_HEIGHT = 32;
	public static final double ENEMY_MAX_SPEED = 50;
	public static final TextureFileDescriptor ENEMY_TEXTURE_MAP = ENT_TEXTURE_FILES[1];
	
	public static final int GHOST_WIDTH = 32;
	public static final int GHOST_HEIGHT = 32;
	public static final double GHOST_MAX_SPEED = 50;
	public static final int GHOST_CHASE_RADIUS = 300;
	public static final TextureFileDescriptor GHOST_TEXTURE_MAP = ENT_TEXTURE_FILES[2];
	
	public static final double ENEMY_REPEL_FACTOR = 5;
	
	public static final String ENT_GRP_PLAYER = "player";
	public static final String ENT_GRP_ENEMIES = "enemies";
	public static final String ENT_GRP_GHOSTS = "ghosts";
	public static final String ENT_GRP_WORLD_OBJS = "worldObjs";
	
	public static final Color ENT_COLOR_DEFAULT = new Color(255, 255, 255, 50);
	public static final Color CURSOR_COLOR_DEFAULT = Color.RED;
	public static final Color COLOR_BACKGROUND = Color.BLACK;
	
	public static final AtomicBoolean isEditModeEnabled = new AtomicBoolean(false);

	public static final long ANIMATION_FRAME_TIME = 150;
}
